package com.right.health.app.common;

import android.app.Activity;
import android.content.DialogInterface;
import android.support.v7.app.AlertDialog;
import android.text.TextUtils;

import com.right.health.app.R;
import com.right.health.app.bean.Banner;
import com.right.health.app.bean.FamilyResponse;
import com.right.health.app.bean.HomeItem;

import java.util.ArrayList;
import java.util.List;

/*
 * Created by hopeliao on 2019-09-24
 *
 */
public class DataCommon {

    public static List<HomeItem> getHomeFeature1() {
        List<HomeItem> list = new ArrayList<>();

        list.add(new HomeItem("挂号", R.mipmap.ic_home_feature1));
        list.add(new HomeItem("诊间支付", R.mipmap.ic_home_feature2));
        list.add(new HomeItem("病历查询", R.mipmap.ic_more_service_item3));
//        list.add(new HomeItem("报告查询", R.mipmap.ic_home_feature3));
//        list.add(new HomeItem("住院押金", R.mipmap.ic_home_feature4));
//        list.add(new HomeItem("更多服务", R.mipmap.ic_home_feature5));

        return list;
    }

    public static List<HomeItem> getHomeFeature2() {
        List<HomeItem> list = new ArrayList<>();

        list.add(new HomeItem("线上复诊", "问诊、开药、配送", R.mipmap.ic_home_feature6));
        list.add(new HomeItem("找医生", "专家咨询 疾病管理", R.mipmap.ic_home_feature7));
        list.add(new HomeItem("我的家人", "管理全家人的健康", R.mipmap.ic_home_feature8));

        return list;
    }

    public static List<Banner> getBannerList() {
        List<Banner> list = new ArrayList<>();

        Banner banner = new Banner();
        banner.resId = R.mipmap.home_banner_1;
        list.add(banner);
        return list;
    }

    public static List<HomeItem> getHomeFeature3() {
        List<HomeItem> list = new ArrayList<>();

//       list.add(new HomeItem("健康商城", R.mipmap.ic_home_feature9));
//        list.add(new HomeItem("便民服务", R.mipmap.ic_home_feature10));
//        list.add(new HomeItem("智能导诊", R.mipmap.ic_home_feature11));
//        list.add(new HomeItem("症状自诊", R.mipmap.ic_home_feature12));
//        list.add(new HomeItem("用药安全", R.mipmap.ic_home_feature13));
//        list.add(new HomeItem("药品查询", R.mipmap.ic_home_feature14));
//        list.add(new HomeItem("社区医院", R.mipmap.ic_home_feature15));
        list.add(new HomeItem("家庭医生", R.mipmap.ic_home_feature10));
        list.add(new HomeItem("知识课堂", R.mipmap.ic_home_feature16));

        return list;
    }

    public static List<HomeItem> getMoreService() {
        List<HomeItem> list = new ArrayList     <>();

        list.add(new HomeItem("出院结算", R.mipmap.ic_more_service_item1));
        list.add(new HomeItem("住院清单", R.mipmap.ic_more_service_item2));
        list.add(new HomeItem("病历查询", R.mipmap.ic_more_service_item3));

        return list;
    }

    public static List<HomeItem> getMedicalType() {
        List<HomeItem> list = new ArrayList<>();

        list.add(new HomeItem("婚育史", R.mipmap.ic_medical_type_item1));
        list.add(new HomeItem("既往史", R.mipmap.ic_medical_type_item2));
        list.add(new HomeItem("手术史", R.mipmap.ic_medical_type_item3));
        list.add(new HomeItem("家族史", R.mipmap.ic_medical_type_item4));
        list.add(new HomeItem("过敏史", R.mipmap.ic_medical_type_item5));

        return list;
    }


    public static List<HomeItem> getHouseholdFeature1() {
        List<HomeItem> list = new ArrayList<>();
//        list.add(new HomeItem("胎心", R.mipmap.ic_household_item1));
        list.add(new HomeItem("血压", R.mipmap.ic_household_item2));
        list.add(new HomeItem("血糖", R.mipmap.ic_household_item3));
//        list.add(new HomeItem("心电", R.mipmap.ic_household_item4));
//        list.add(new HomeItem("呼吸", R.mipmap.ic_household_item5));
//        list.add(new HomeItem("血氧心率", R.mipmap.ic_household_item6));
//        list.add(new HomeItem("体温", R.mipmap.ic_household_item7));
//        list.add(new HomeItem("身高体重", R.mipmap.ic_household_item8));
//        list.add(new HomeItem("步态检测", R.mipmap.ic_household_item9));
//        list.add(new HomeItem("孝心环", R.mipmap.ic_household_item10));
//        list.add(new HomeItem("尿酸", R.mipmap.ic_household_item11));
//        list.add(new HomeItem("尿量", R.mipmap.ic_household_item12));
//        list.add(new HomeItem("身体围度", R.mipmap.ic_household_item13));
        return list;
    }

    public static List<HomeItem> getHouseholdFeature2() {
        List<HomeItem> list = new ArrayList<>();
        list.add(new HomeItem("饮食记录", R.mipmap.ic_household_item14));
        list.add(new HomeItem("运动记录", R.mipmap.ic_household_item15));
        list.add(new HomeItem("睡眠", R.mipmap.ic_household_item16));
        return list;
    }

    public static List<HomeItem> getDoctorService() {
        List<HomeItem> list = new ArrayList<>();

        list.add(new HomeItem("无限期", "免费咨询", R.mipmap.ic_doctor_detail_follow1));
        list.add(new HomeItem("20元/次", "图文咨询", R.mipmap.ic_doctor_detail_follow2));
        list.add(new HomeItem("未开通", "胎心解读", R.mipmap.ic_doctor_detail_follow3));
        list.add(new HomeItem("10元/次", "电话咨询", R.mipmap.ic_doctor_detail_follow4));
        list.add(new HomeItem("30元/次", "视频咨询", R.mipmap.ic_doctor_detail_follow5));


        return list;
    }

    public static List<String> getTestDataSource() {
        List<String> list = new ArrayList<String>();
        for (int i = 0; i < 10; i++) {
            list.add(String.valueOf(i + 1));
        }
        return list;
    }


    public static List<FamilyResponse.FamilyInfo> getFamilyRelationship() {
        List<FamilyResponse.FamilyInfo> data = new ArrayList<>();
        data.add(new FamilyResponse.FamilyInfo("0", "父亲"));
        data.add(new FamilyResponse.FamilyInfo("1", "母亲"));
        data.add(new FamilyResponse.FamilyInfo("2", "本人"));
        data.add(new FamilyResponse.FamilyInfo("3", "妻子"));
        data.add(new FamilyResponse.FamilyInfo("4", "儿子"));
        data.add(new FamilyResponse.FamilyInfo("5", "女儿"));
        data.add(new FamilyResponse.FamilyInfo("7", "丈夫"));
        data.add(new FamilyResponse.FamilyInfo("6", "其他"));
        return data;
    }


    public static String getSex(String state) {
        if(TextUtils.isEmpty(state) || "M".equalsIgnoreCase(state)) {
            return "男";
        } else {
            return "女";
        }
    }

    public static AlertDialog getDeleteDialog(Activity act, DialogInterface.OnClickListener positiveListener) {
        return new AlertDialog.Builder(act).setMessage("确认是否删除?")
                .setPositiveButton("删除", positiveListener).setNegativeButton("取消", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog1, int which) {
                        dialog1.dismiss();
                    }
                }).create();
    }
}
